<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ include file="/WEB-INF/views/include/head.jsp"%>
<!DOCTYPE html>
<html style="overflow-x:hidden;overflow-y:auto;"><head>
<title>邯郸微购物</title>		
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">        
<!-- Mobile Devices Support @begin -->
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
<meta content="no-cache" http-equiv="pragma">
<meta content="0" http-equiv="expires">
<meta content="telephone=no, address=no" name="format-detection">
<meta name="apple-mobile-web-app-capable" content="yes"> <!-- apple devices fullscreen -->
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">

<link rel="stylesheet" type="text/css" href="${ctxStatic }/shopping/common.css" media="all">
<link rel="stylesheet" type="text/css" href="${ctxStatic }/shopping/list.css" media="all">
<link rel="stylesheet" type="text/css" href="${ctxStatic }/shopping/list_css.css" media="all">
<link rel="stylesheet" type="text/css" href="${ctxStatic }/shopping/home-menu-8.css" media="all">
<link rel="stylesheet" type="text/css" href="${ctxStatic }/shopping/font-awesome.css" media="all">

<script type="text/javascript">
		$(document).ready(function() {
			document.title = "邯郸微购物";
		});
		
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			window.location.href="${ctxFront }/shopping/product?pageNo="+n+"&pageSize="+s+"&category=${category}&subCategory=${subCategory}";
        }
		
		function showDetail(id){
			var flag = $('#'+id).css("display");
			
			if( flag ===  'block'){
				$('#'+id).hide();
			}else{
				$('#'+id).show();
			}
		}

		
		
		$(function(){
			$("#movie").click(function(event) {
				$("#subOrder").hide();
				$("#order").removeClass("active");
				$("#hide").hide();
				if($("#subMovie").is(":visible")==false){
					$("#subMovie").show();
					$("#movie").addClass("active");
					$("#hide").show();
				}else{
					$("#subMovie").hide();
					$("#movie").removeClass("active");
					$("#hide").hide();
				};
			});
			
			$("#order").click(function(event) {
				$("#subMovie").hide();
				$("#movie").removeClass("active");
				$("#hide").hide();
				if($("#subOrder").is(":visible")==false){
					$("#subOrder").show();
					$("#order").addClass("active");
					$("#hide").show();
				}else{
					$("#subOrder").hide();
					$("#order").removeClass("active");
					$("#hide").hide();
				};
			});
		});
	</script>
</head>

<body>
<div class="body">
  <header class="w-list-header">
    <a class="arrow-left" href=""></a>
    <form id="searchForm" action="${ctxFront }/shopping/product?uid=${uid}&wechatId=${wechatId}"  method="get" >
    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}" />
	<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}" />
	<input id="category" name="category" type="hidden" value="${category}" />
	<input id="subCategory" name="subCategory" type="hidden" value="${subCategory}" />
    <div class="search-wrap clearfix">
      <input type="text" name="kw" class="j-search-input" placeholder="请输入您想找的团购" value="">
      <a class="rlai" id="j-submit" href="javascript:;">搜索</a>
     </div>
     </form>
  </header>
  <ul class="w-sort j-w-sort clearfix" mon="action=click&amp;type=selectorBar"  style="margin:0px;">

<li id="movie"  class="" data-type="category" mon="content=cate"  style="padding:0px;width: 43%;" >${productCategory.name }</li>
<li id="order" data-type="order" mon="content=order"  style="padding:0px;width: 43%;">
<c:if test="${order eq 1 }">默认排序</c:if>
<c:if test="${order eq 2 }">销量最高</c:if>
<c:if test="${order eq 3 }">价格最低</c:if>
<c:if test="${order eq 4 }">价格最高</c:if>
</li>
</ul>
<div class="w-sort-container j-w-sort-container"  mon="action=click">
<section style="display: none;" id="subMovie"  class="j-category w-sort__2col"  mon="action=click">
<ul class="nav j-nav" mon="type=mainCate">
<c:forEach items="${ChildCategorieList }" var="categorie">
<a href="${ctxFront }/shopping/product?category=${productCategory.value}&subCategory=${categorie.value}&order=${order}&uid=${uid}&wechatId=${wechatId}"><li>${ categorie.name}</li></a>
</c:forEach>
</ul>
</section>
<section id="subOrder" class="j-order w-sort__single" mon="action=click&amp;type=sort">
<ul>

<a href="${ctxFront }/shopping/product?category=${productCategory.value}&subCategory=${subCategory}&order=1&uid=${uid}&wechatId=${wechatId}"><li data-query="listorder=1">默认排序</li></a>

<a href="${ctxFront }/shopping/product?category=${productCategory.value}&subCategory=${subCategory}&order=2&uid=${uid}&wechatId=${wechatId}"><li data-query="listorder=2">销量最高</li></a>

<a href="${ctxFront }/shopping/product?category=${productCategory.value}&subCategory=${subCategory}&order=3&uid=${uid}&wechatId=${wechatId}"><li data-query="listorder=3">价格最低</li></a>

<a href="${ctxFront }/shopping/product?category=${productCategory.value}&subCategory=${subCategory}&order=4&uid=${uid}&wechatId=${wechatId}"><li data-query="listorder=4">价格最高</li></a>
</ul>
</section>
</div>
  <c:forEach items="${page.list}" var="product">
  <section class="w-goods">
    <a href="${ctxFront }/shopping/product/detail/${product.id}.html?uid=${uid}&wechatId=${wechatId}" class="clearfix">
        <div class="img-wrapper">
         <img src="${ctxUser }/product/${product.pic}"  width="118" height="79" style="visibility: visible; ">
        </div>
        <ul>
          <li class="title">
            <span class="item-name">${product.name}</span>
          </li>
          <li class="info">
          ${fn:substring(product.description,0,75)}
          </li>
          <li class="others">
            <ins>${product.price/100 }</ins>
            <c:if test="${product.sourcePrice != null&&!(empty  product.sourcePrice)  }">
            <span class="slash">/</span>
            <del class="old-price">${product.sourcePrice/100 }</del>
            </c:if>
            <span class="bought">${product.sellCount }</span>
          </li>
        </ul>
    </a>
  </section>
  </c:forEach>
<div class="pagination">${pagination }</div>
<div class="w-sort__mask" style="display: none; height: 2631px;" id="hide" ></div>
</div>
<jsp:include page="./footer.jsp"></jsp:include>
</body>
</html>
